<template>
    <div class="container">
		<Header></Header>
		<Carousel :carouselList = 'carouselList' :dailyNews = 'dailyNews'></Carousel>
		<NewsList :newsList = 'newsList'></NewsList>
		<Case :caseList="caseList"></Case>
		<AllRoundService></AllRoundService>
		<AllRoundSupport></AllRoundSupport>

		<UniversityInfo :universityInfoList = 'universityInfoList'></UniversityInfo>
		<About :aboutList = 'aboutList' :infoList = 'infoList'></About>
		<Info :contactList = 'contactList' :infoList = 'infoList'></Info>
	</div>
</template>

<script>
//1.引入
import {getHomeData} from './../../service/index.js';

import Header from './../../components/header/Header.vue';
import Carousel from './components/carousel/Carousel.vue';
import UniversityInfo from './components/university_info/UniversityInfo.vue';
import NewsList from './components/news_list/NewsList.vue';
import AllRoundSupport from './components/all_round/AllRoundSupport.vue';
import AllRoundService from './components/all_round/AllRoundService.vue';
import About from './../../components/footer/About.vue';
import Info from './../../components/footer/Info.vue';
import Case from './components/case/Case.vue';

export default {
		data(){
			return {
				carouselList:[],
				dailyNews:[],
				universityInfoList:[],
				newsList:[],
				aboutList:[],
				// infoList:{},
				contactList:[],
				caseList:[]
			}
        },
        components:{
			Header,
			Carousel,
			UniversityInfo,
			NewsList,
			AllRoundSupport,
			AllRoundService,
			About,
			Info,
			Case
        },
		onLoad() {

		},
		created() {

			// this.reqData();
			getHomeData().then((response)=>{
				console.log(response);
				if(response.code == 200){
					this.carouselList = response.data.banner_list;
					this.dailyNews = response.data.top_info;
					this.universityInfoList = response.data.cate_list;
					this.newsList = response.data.information_list;
					this.aboutList = response.data.teamwork_list;
					this.contactList = response.data.concat_list
					this.caseList = response.data.case_list
				}
			}).catch(err=>{
				console.log(err);
			})
		},
	methods:{
		// async reqData(){
		// 	let res = await getConfig();
		// 	console.log(res);
		// 	if(res.code == 200){
		// 		this.infoList = res.data
		// 	}
		// }
	}
	}
</script>

<style>

</style>

